'''

@author: wyndem
@Emil:   wyndem@qq.com
@FileName: routes.py
@Time: 2019/2/22 10:14
@Software: PyCharm
@Description: 

'''
from application.views import presence, addUser, updataUser, getUserInfo, recharge, announcement, consumption, version, \
    exceptSave, consumption_ll, card, new_version, notice


def setup_routes(app):
    #验证用户是否存在
    app.router.add_post('/presence', presence)
    #注册用户
    app.router.add_post('/add', addUser)
    #更新用户
    app.router.add_post('/updata', updataUser)
    #查询用户的分数
    app.router.add_get('/info', getUserInfo)
    #充值接口
    app.router.add_post('/recharge', recharge)
    #充值流量
    app.router.add_post('/consumptionll', consumption_ll)
    #获取通知
    app.router.add_get('/announcement', announcement)
    #消费接口
    app.router.add_post('/consumption', consumption)
    #版本接口
    app.router.add_get('/version', version)
    #异常接口
    app.router.add_post('/except', exceptSave)
    #生成卡密
    app.router.add_get('/card', card)
    #发布版本
    app.router.add_get('/newversion', new_version)
    #发布通知
    app.router.add_get('/notice', notice)
